<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html class=" -webkit-">
<head>
	<meta charset="utf-8">
    <title>杰利联合</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
	<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
    <meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
    <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
    <meta content="no-cache" http-equiv="pragma">
    <meta content="0" http-equiv="expires">
    <meta content="telephone=no, address=no" name="format-detection">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
       <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
    <link rel="stylesheet" type="text/css" href="${ctxStatic}/jiu/css/mobile_module.css?v=1493085388" media="all">
    <link href="${ctxStatic}/jiu/css/common.css?v=1493085388" rel="stylesheet" type="text/css">
    
    <script type="text/javascript" src="${ctxStatic}/jiu/js/jquery-2.0.3.min.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="${ctxStatic}/jiu/js/prefixfree.min.js?v=1493085388"></script>
	<script type="text/javascript" src="${ctxStatic}/jiu/js/dialog.js?v=1493085388"></script>
	<script type="text/javascript" src="${ctxStatic}/jiu/js/flipsnap.min.js?v=1493085388"></script>
	<script type="text/javascript" src="${ctxStatic}/jiu/js/mobile_module.js?v=1493085388"></script>
	<style>
				
			.yin{
				
				background-color:rgba(0, 0, 0, 0.5);								
				width: 100%;
				height: 100%;								
				position: fixed;
				top: 0;
				left: 0;
				z-index: 9999;
				display: none;
			}
			.loading{
				line-height: 50px;
				width: 200px;
				height: 50px;
				display: none;
				background-color: rgba(23, 21, 21, 0.51);
				position: fixed;
				top: 50%;
				left: 50%;
				margin: -25px 0 0 -100px;
				z-index: 10000;				
				border-radius: 5px;
				-webkit-border-radius: 5px;
				color: #fff;
				text-align: center;
			}
		</style>
</head>

<body>
<div class="container">
  <!-- 订单信息 -->
  <div class="order_info">
    <p class="t">订单编号：${jiuOrder.orderNo}</p>
	<p class="t">传图设计师：${jiuOrder.designName}</p>
	<p class="t">订单清单：${jiuOrder.detailedList}</p>
    <ul>
          </ul>
    <!--<p class="ship_type"> <span class="fl">配送方式</span> <span class="fr">快递：10元</span> </p>-->
    <p class="order_remark">
      <textarea placeholder="给厂家留言 或者 填写取消原因" name="remark" id="remarks"></textarea>
    </p>
	<input type="hidden" name="order_number" value="20170425095322ac12cc6bd">
	<input type="hidden" name="order_id" value="8905">
    <p class="total_price"> <span class="orange">共${jiuOrder.totalPrice}积分</span> </p>
    <a class="btn" href="javascript:void(0)" onclick="examine(2)">确认订单</a><br>
 	 	<a style="margin-bottom: 10px;" class="btn blue_btn" href="javascript:void(0)" onclick="examine(1)">取消订单</a>

  </div>
	<div class="modal fade" style="margin-top: 30%;" id="myModal"
			tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header" style="width:100%;position:relative">
						<button type="button" class="close" data-dismiss="modal"
							aria-label="Close" style="position:absolute;right:10px;text-align:right">
							<span aria-hidden="true">&times;</span>
						</button>
						<h4 class="modal-title" id="myModalLabel">操作提示</h4>
					</div>
					<div class="modal-body"></div>
					<div class="modal-footer" style="display:flex;justify-content:space-between;" >
						<button type="button" class="btn btn-success" data-dismiss="modal"
							id="yes" style="width:100px">确定</button>
						<button style="width:100px;background:red;" type="button" class="btn btn-danger" data-dismiss="modal"
							id="no">取消</button>
					</div>
				</div>
			</div>
		</div>
</div>
		<div class="yin">
		</div>
		<div class="loading" >			
			 <img alt="" src="${ctxStatic}/jiu/img/icon32_loading_dark.gif">正在提交，请稍后...	
		</div>
		<script>
			$(document).ready(function() {
				$('.btn').click(function() {
					$('.loading').fadeIn().delay(3000).fadeOut();
					$('.yin').fadeIn(300).delay(3000).fadeOut();
				})
			});			
		</script>

<script type="text/javascript">
	window.alert = function(name){
	  var iframe = document.createElement("IFRAME");
	  iframe.style.display="none";
	  iframe.setAttribute("src", 'data:text/plain,');
	  document.documentElement.appendChild(iframe);
	  window.frames[0].window.alert(name);
	  iframe.parentNode.removeChild(iframe);
	 };
	 
	 window.confirm = function (message) {
	   var iframe = document.createElement("IFRAME");
	   iframe.style.display = "none";
	   iframe.setAttribute("src", 'data:text/plain,');
	   document.documentElement.appendChild(iframe);
	   var alertFrame = window.frames[0];
	   var result = alertFrame.window.confirm(message);
	   iframe.parentNode.removeChild(iframe);
	   return result;
	 };
 
 var tag=0;
 function examine(type){
	 if(tag==1){
		 return;
	 }
	 var remarks=$('#remarks').val();
	 
	 tag=1;
	 $.getJSON("${ctxFront }/jiu/examine",{type:type,orderId:"${jiuOrder.id}",remarks:remarks}, function(data){
		 $('#myModal').modal('show')  ;
  	    $(".modal-body").text(data.message);
          if(data.msg=='success'){
        	  $("#yes").click(function(){
            	  window.location.href="${ctxFront }/jiu/dingdan?uid=${jiuOrder.userId}&v="+Math.random();
        	  });
          }
     });
 }
</script>
</body>
</html>
